package io.renren.modules.generator.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.generator.dao.TbUserMovieCollectionDao;
import io.renren.modules.generator.entity.TbUserMovieCollectionEntity;
import io.renren.modules.generator.service.TbUserMovieCollectionService;


@Service("tbUserMovieCollectionService")
public class TbUserMovieCollectionServiceImpl extends ServiceImpl<TbUserMovieCollectionDao, TbUserMovieCollectionEntity> implements TbUserMovieCollectionService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        QueryWrapper qw = new QueryWrapper<TbUserMovieCollectionEntity>();
        qw.eq("user_id",params.get("userId"));
        qw.eq("type",params.get("type"));
        IPage<TbUserMovieCollectionEntity> page = this.page(
                new Query<TbUserMovieCollectionEntity>().getPage(params),
                qw
        );

        return new PageUtils(page);
    }

}